Update typeshed to bd18cc64#11389
Merged
StellaHuang95 merged 1 commit intomicrosoft:mainfrom Apr 15, 2026
Merged
Conversation
Contributor
|
Diff from mypy_primer, showing the effect of this PR on open source code: ibis (https://github.com/ibis-project/ibis)
+ .../projects/ibis/ibis/expr/api.py:1234:12 - error: Type "Scalar" is not assignable to return type "IntervalScalar"
+ "Scalar" is not assignable to "IntervalScalar" (reportReturnType)
+ .../projects/ibis/ibis/expr/api.py:1234:29 - error: Argument of type "Overload[(a: SupportsAdd[_T_contra@add, _T_co@add], b: _T_contra@add, /) -> _T_co@add, (a: _T_contra@add, b: SupportsRAdd[_T_contra@add, _T_co@add], /) -> _T_co@add]" cannot be assigned to parameter "function" of type "(_T@reduce, _T@reduce) -> _T@reduce" in function "reduce"
+ No overloaded function matches type "(Scalar, Scalar) -> Scalar" (reportArgumentType)
- 7571 errors, 262 warnings, 0 informations
+ 7573 errors, 262 warnings, 0 informations
sympy (https://github.com/sympy/sympy)
+ .../projects/sympy/sympy/printing/rust.py:404:27 - error: Argument of type "Overload[(a: SupportsMul[_T_contra@mul, _T_co@mul], b: _T_contra@mul, /) -> _T_co@mul, (a: _T_contra@mul, b: SupportsRMul[_T_contra@mul, _T_co@mul], /) -> _T_co@mul]" cannot be assigned to parameter "function" of type "(_T@reduce, _T@reduce) -> _T@reduce" in function "reduce"
+ No overloaded function matches type "(TypeCast | Float | Unknown | int, TypeCast | Float | Unknown | int) -> (TypeCast | Float | Unknown | int)" (reportArgumentType)
- .../projects/sympy/sympy/solvers/tests/test_solveset.py:445:30 - error: Cannot access attribute "limit_denominator" for class "NaN"
- Attribute "limit_denominator" is unknown (reportAttributeAccessIssue)
- .../projects/sympy/sympy/solvers/tests/test_solveset.py:445:30 - error: Cannot access attribute "limit_denominator" for class "ComplexInfinity"
- Attribute "limit_denominator" is unknown (reportAttributeAccessIssue)
- .../projects/sympy/sympy/stats/joint_rv_types.py:576:27 - error: Argument of type "One | NegativeOne | Zero | Integer | NaN | ComplexInfinity | Rational | Infinity | NegativeInfinity | Float | Number | Expr" cannot be assigned to parameter "stop" of type "SupportsIndex" in function "__new__"
+ .../projects/sympy/sympy/stats/joint_rv_types.py:576:27 - error: Argument of type "One | NegativeOne | Zero | Integer | NaN | ComplexInfinity | Rational | Unknown | Infinity | NegativeInfinity | Float | Number | Expr" cannot be assigned to parameter "stop" of type "SupportsIndex" in function "__new__"
- Type "One | NegativeOne | Zero | Integer | NaN | ComplexInfinity | Rational | Infinity | NegativeInfinity | Float | Number | Expr" is not assignable to type "SupportsIndex"
+ Type "One | NegativeOne | Zero | Integer | NaN | ComplexInfinity | Rational | Unknown | Infinity | NegativeInfinity | Float | Number | Expr" is not assignable to type "SupportsIndex"
- .../projects/sympy/sympy/stats/rv_interface.py:451:42 - error: Operator "-" not supported for types "Unknown | Basic | Any" and "Rational | NaN | ComplexInfinity"
+ .../projects/sympy/sympy/stats/rv_interface.py:451:42 - error: Operator "-" not supported for types "Unknown | Basic | Any" and "Rational | Unknown"
- Operator "-" not supported for types "Basic" and "Rational"
- Operator "-" not supported for types "Basic" and "NaN"
- Operator "-" not supported for types "Basic" and "ComplexInfinity" (reportOperatorIssue)
+ Operator "-" not supported for types "Basic" and "Rational" (reportOperatorIssue)
+ .../projects/sympy/sympy/stats/symbolic_probability.py:75:9 - error: Method "doit" overrides class "Basic" in an incompatible manner
+ Return type mismatch: base method returns type "Basic", override returns type "Unknown | Any | BernoulliDistribution | Probability | Zero | One | tuple[Unknown, ...] | Sum | Expr | ZeroMatrix | NaN | Piecewise | Basic | ComplexInfinity | Float | Infinity | Integer | Lambda | Mul | NegativeInfinity | NegativeOne | Number | Rational | Integral | Literal[0]"
+ Type "Unknown | Any | BernoulliDistribution | Probability | Zero | One | tuple[Unknown, ...] | Sum | Expr | ZeroMatrix | NaN | Piecewise | Basic | ComplexInfinity | Float | Infinity | Integer | Lambda | Mul | NegativeInfinity | NegativeOne | Number | Rational | Integral | Literal[0]" is not assignable to type "Basic"
+ "Literal[0]" is not assignable to "Basic" (reportIncompatibleMethodOverride)
+ .../projects/sympy/sympy/stats/tests/test_continuous_rv.py:1543:12 - error: No overloads for "simplify" match the provided arguments (reportCallIssue)
+ .../projects/sympy/sympy/stats/tests/test_continuous_rv.py:1543:21 - error: Argument of type "Unknown | Any | BernoulliDistribution | Probability | Zero | One | tuple[Unknown, ...] | Sum | Expr | ZeroMatrix | NaN | Piecewise | Basic | ComplexInfinity | Float | Infinity | Integer | Lambda | Mul | NegativeInfinity | NegativeOne | Number | Rational | Integral | Literal[0]" cannot be assigned to parameter "expr" of type "Basic" in function "simplify"
+ Type "Unknown | Any | BernoulliDistribution | Probability | Zero | One | tuple[Unknown, ...] | Sum | Expr | ZeroMatrix | NaN | Piecewise | Basic | ComplexInfinity | Float | Infinity | Integer | Lambda | Mul | NegativeInfinity | NegativeOne | Number | Rational | Integral | Literal[0]" is not assignable to type "Basic"
+ "Literal[0]" is not assignable to "Basic" (reportArgumentType)
+ .../projects/sympy/sympy/stats/tests/test_continuous_rv.py:1545:12 - error: No overloads for "simplify" match the provided arguments (reportCallIssue)
+ .../projects/sympy/sympy/stats/tests/test_continuous_rv.py:1545:21 - error: Argument of type "Unknown | Any | BernoulliDistribution | Probability | Zero | One | tuple[Unknown, ...] | Sum | Expr | ZeroMatrix | NaN | Piecewise | Basic | ComplexInfinity | Float | Infinity | Integer | Lambda | Mul | NegativeInfinity | NegativeOne | Number | Rational | Integral | Literal[0]" cannot be assigned to parameter "expr" of type "Basic" in function "simplify"
+ Type "Unknown | Any | BernoulliDistribution | Probability | Zero | One | tuple[Unknown, ...] | Sum | Expr | ZeroMatrix | NaN | Piecewise | Basic | ComplexInfinity | Float | Infinity | Integer | Lambda | Mul | NegativeInfinity | NegativeOne | Number | Rational | Integral | Literal[0]" is not assignable to type "Basic"
+ "Literal[0]" is not assignable to "Basic" (reportArgumentType)
+ .../projects/sympy/sympy/stats/tests/test_continuous_rv.py:1550:12 - error: No overloads for "simplify" match the provided arguments (reportCallIssue)
+ .../projects/sympy/sympy/stats/tests/test_continuous_rv.py:1550:21 - error: Argument of type "Unknown | Any | BernoulliDistribution | Probability | Zero | One | tuple[Unknown, ...] | Sum | Expr | ZeroMatrix | NaN | Piecewise | Basic | ComplexInfinity | Float | Infinity | Integer | Lambda | Mul | NegativeInfinity | NegativeOne | Number | Rational | Integral | Literal[0]" cannot be assigned to parameter "expr" of type "Basic" in function "simplify"
+ Type "Unknown | Any | BernoulliDistribution | Probability | Zero | One | tuple[Unknown, ...] | Sum | Expr | ZeroMatrix | NaN | Piecewise | Basic | ComplexInfinity | Float | Infinity | Integer | Lambda | Mul | NegativeInfinity | NegativeOne | Number | Rational | Integral | Literal[0]" is not assignable to type "Basic"
+ "Literal[0]" is not assignable to "Basic" (reportArgumentType)
- .../projects/sympy/sympy/stats/tests/test_finite_rv.py:34:23 - error: Operator "/" not supported for types "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | NotImplementedType | tuple[Unknown, ...] | Sum | ZeroMatrix | Piecewise | Basic | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0]" and "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | NotImplementedType | tuple[Unknown, ...] | Sum | ZeroMatrix | Piecewise | Basic | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0]"
+ .../projects/sympy/sympy/stats/tests/test_finite_rv.py:34:23 - error: Operator "/" not supported for types "Unknown | Any | BernoulliDistribution | Probability | Zero | One | tuple[Unknown, ...] | Sum | Expr | ZeroMatrix | NaN | Piecewise | Basic | ComplexInfinity | Float | Infinity | Integer | Lambda | Mul | NegativeInfinity | NegativeOne | Number | Rational | Integral | Literal[0]" and "Unknown | Any | BernoulliDistribution | Probability | Zero | One | tuple[Unknown, ...] | Sum | Expr | ZeroMatrix | NaN | Piecewise | Basic | ComplexInfinity | Float | Infinity | Integer | Lambda | Mul | NegativeInfinity | NegativeOne | Number | Rational | Integral | Literal[0]"
- .../projects/sympy/sympy/stats/tests/test_finite_rv.py:35:23 - error: Operator "*" not supported for types "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | NotImplementedType | tuple[Unknown, ...] | Sum | ZeroMatrix | Piecewise | Basic | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0]" and "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | NotImplementedType | tuple[Unknown, ...] | Sum | ZeroMatrix | Piecewise | Basic | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0]"
+ .../projects/sympy/sympy/stats/tests/test_finite_rv.py:35:23 - error: Operator "*" not supported for types "Unknown | Any | BernoulliDistribution | Probability | Zero | One | tuple[Unknown, ...] | Sum | Expr | ZeroMatrix | NaN | Piecewise | Basic | ComplexInfinity | Float | Infinity | Integer | Lambda | Mul | NegativeInfinity | NegativeOne | Number | Rational | Integral | Literal[0]" and "Unknown | Any | BernoulliDistribution | Probability | Zero | One | tuple[Unknown, ...] | Sum | Expr | ZeroMatrix | NaN | Piecewise | Basic | ComplexInfinity | Float | Infinity | Integer | Lambda | Mul | NegativeInfinity | NegativeOne | Number | Rational | Integral | Literal[0]"
+ Operator "*" not supported for types "BernoulliDistribution" and "tuple[Unknown, ...]"
+ Operator "*" not supported for types "BernoulliDistribution" and "Sum"
- Operator "*" not supported for types "BernoulliDistribution" and "Float"
+ Operator "*" not supported for types "BernoulliDistribution" and "ZeroMatrix"
- Operator "*" not supported for types "BernoulliDistribution" and "ComplexInfinity"
- Operator "*" not supported for types "BernoulliDistribution" and "Rational"
- Operator "*" not supported for types "BernoulliDistribution" and "Infinity"
+ Operator "*" not supported for types "BernoulliDistribution" and "Piecewise"
... (truncated 159 lines) ...
pytest (https://github.com/pytest-dev/pytest)
+ .../projects/pytest/src/_pytest/_io/terminalwriter.py:223:59 - error: Argument of type "str | None" cannot be assigned to parameter "style" of type "type[Style] | str" in function "__init__"
+ Type "str | None" is not assignable to type "type[Style] | str"
+ Type "None" is not assignable to type "type[Style] | str"
+ Type "None" is not assignable to type "type[Style]"
+ "None" is not assignable to "str" (reportArgumentType)
- 341 errors, 17 warnings, 0 informations
+ 342 errors, 17 warnings, 0 informations
scikit-learn (https://github.com/scikit-learn/scikit-learn)
+ .../projects/scikit-learn/sklearn/model_selection/_search.py:176:13 - error: Expected 1 more positional argument (reportCallIssue)
- 16807 errors, 455 warnings, 0 informations
+ 16808 errors, 455 warnings, 0 informations
openlibrary (https://github.com/internetarchive/openlibrary)
- .../projects/openlibrary/openlibrary/plugins/openlibrary/lists.py:145:21 - error: Operator "|" not supported for types "dict[Unknown, Unknown]" and "Unknown | list[Any]"
+ .../projects/openlibrary/openlibrary/plugins/openlibrary/lists.py:145:21 - error: Operator "|" not supported for types "dict[Unknown | str, Unknown]" and "Unknown | list[Any]"
- Operator "|" not supported for types "dict[Unknown, Unknown]" and "list[Any]" (reportOperatorIssue)
+ Operator "|" not supported for types "dict[Unknown | str, Unknown]" and "list[Any]" (reportOperatorIssue)
Tanjun (https://github.com/FasterSpeeding/Tanjun)
+ .../projects/Tanjun/tanjun/conversion.py:133:37 - warning: Type of "ior" is partially unknown
+ Type of "ior" is "(a: Unknown, b: Unknown, /) -> Unknown" (reportUnknownMemberType)
+ .../projects/Tanjun/tanjun/conversion.py:133:37 - warning: Argument type is partially unknown
+ Argument corresponds to parameter "function" in function "reduce"
+ Argument type is "(a: Unknown, b: Unknown, /) -> Unknown" (reportUnknownArgumentType)
+ .../projects/Tanjun/tanjun/conversion.py:156:37 - warning: Type of "ior" is partially unknown
+ Type of "ior" is "(a: Unknown, b: Unknown, /) -> Unknown" (reportUnknownMemberType)
+ .../projects/Tanjun/tanjun/conversion.py:156:37 - warning: Argument type is partially unknown
+ Argument corresponds to parameter "function" in function "reduce"
+ Argument type is "(a: Unknown, b: Unknown, /) -> Unknown" (reportUnknownArgumentType)
- 36 errors, 108 warnings, 0 informations
+ 36 errors, 112 warnings, 0 informations
spark (https://github.com/apache/spark)
- .../projects/spark/python/pyspark/cloudpickle/cloudpickle.py:1355:13 - error: Method "reducer_override" overrides class "Pickler" in an incompatible manner
- Positional parameter count mismatch; base method has 1, but override has 2 (reportIncompatibleMethodOverride)
+ .../projects/spark/python/pyspark/core/rdd.py:2155:16 - error: Argument of type "Overload[(a: SupportsAdd[_T_contra@add, _T_co@add], b: _T_contra@add, /) -> _T_co@add, (a: _T_contra@add, b: SupportsRAdd[_T_contra@add, _T_co@add], /) -> _T_co@add]" cannot be assigned to parameter "op" of type "(NumberOrArray@sum | int, NumberOrArray@sum | int) -> (NumberOrArray@sum | int)" in function "fold"
+ No overloaded function matches type "(NumberOrArray@sum | int, NumberOrArray@sum | int) -> (NumberOrArray@sum | int)" (reportArgumentType)
+ .../projects/spark/python/pyspark/sql/connect/client/core.py:1147:37 - error: Cannot access attribute "label" for class "FieldDescriptor"
+ Attribute "label" is unknown (reportAttributeAccessIssue)
+ .../projects/spark/python/pyspark/sql/connect/client/core.py:1158:35 - error: Cannot access attribute "label" for class "FieldDescriptor"
+ Attribute "label" is unknown (reportAttributeAccessIssue)
+ .../projects/spark/python/pyspark/sql/connect/client/core.py:1165:35 - error: Cannot access attribute "label" for class "FieldDescriptor"
+ Attribute "label" is unknown (reportAttributeAccessIssue)
+ .../projects/spark/python/pyspark/sql/streaming/proto/StateMessage_pb2.py:53:16 - error: Cannot assign to attribute "_loaded_options" for class "FileDescriptor"
+ Attribute "_loaded_options" is unknown (reportAttributeAccessIssue)
+ .../projects/spark/python/pyspark/streaming/dstream.py:705:13 - error: Argument of type "Overload[(a: SupportsAdd[_T_contra@add, _T_co@add], b: _T_contra@add, /) -> _T_co@add, (a: _T_contra@add, b: SupportsRAdd[_T_contra@add, _T_co@add], /) -> _T_co@add]" cannot be assigned to parameter "func" of type "(Literal[1], Literal[1]) -> Literal[1]" in function "reduceByKeyAndWindow"
+ No overloaded function matches type "(Literal[1], Literal[1]) -> Literal[1]" (reportArgumentType)
+ .../projects/spark/python/pyspark/streaming/dstream.py:705:27 - error: Argument of type "Overload[(a: SupportsSub[_T_contra@sub, _T_co@sub], b: _T_contra@sub, /) -> _T_co@sub, (a: _T_contra@sub, b: SupportsRSub[_T_contra@sub, _T_co@sub], /) -> _T_co@sub]" cannot be assigned to parameter "invFunc" of type "((Literal[1], Literal[1]) -> Literal[1]) | None" in function "reduceByKeyAndWindow"
+ Type "Overload[(a: SupportsSub[_T_contra@sub, _T_co@sub], b: _T_contra@sub, /) -> _T_co@sub, (a: _T_contra@sub, b: SupportsRSub[_T_contra@sub, _T_co@sub], /) -> _T_co@sub]" is not assignable to type "((Literal[1], Literal[1]) -> Literal[1]) | None"
+ No overloaded function matches type "(Literal[1], Literal[1]) -> Literal[1]"
+ "FunctionType" is not assignable to "None" (reportArgumentType)
- 31762 errors, 932 warnings, 0 informations
+ 31768 errors, 932 warnings, 0 informations
optuna (https://github.com/optuna/optuna)
+ .../projects/optuna/optuna/storages/_grpc/auto_generated/api_pb2.py:33:14 - error: Cannot assign to attribute "_loaded_options" for class "FileDescriptor"
+ Attribute "_loaded_options" is unknown (reportAttributeAccessIssue)
- 841 errors, 29 warnings, 0 informations
+ 842 errors, 29 warnings, 0 informations
vision (https://github.com/pytorch/vision)
+ .../projects/vision/torchvision/prototype/datasets/_builtin/mnist.py:51:25 - error: Expected 1 more positional argument (reportCallIssue)
- 1712 errors, 51 warnings, 0 informations
+ 1713 errors, 51 warnings, 0 informations
manticore (https://github.com/trailofbits/manticore)
+ .../projects/manticore/tests/native/test_x86.py:48:12 - error: Invalid conditional operand of type "Unknown | BoolEqual | bool"
+ Method __bool__ for type "BoolEqual" returns type "int | bool" rather than "bool" (reportGeneralTypeIssues)
+ .../projects/manticore/tests/native/test_x86.py:50:12 - error: Invalid conditional operand of type "Unknown | BoolEqual | bool"
+ Method __bool__ for type "BoolEqual" returns type "int | bool" rather than "bool" (reportGeneralTypeIssues)
+ .../projects/manticore/tests/native/test_x86.py:52:12 - error: Invalid conditional operand of type "Unknown | BoolEqual | bool"
+ Method __bool__ for type "BoolEqual" returns type "int | bool" rather than "bool" (reportGeneralTypeIssues)
+ .../projects/manticore/tests/native/test_x86.py:59:12 - error: Invalid conditional operand of type "Unknown | BoolNot | bool"
+ Method __bool__ for type "BoolNot" returns type "int | bool" rather than "bool" (reportGeneralTypeIssues)
+ .../projects/manticore/tests/native/test_x86.py:60:12 - error: Invalid conditional operand of type "Unknown | BoolEqual | bool"
+ Method __bool__ for type "BoolEqual" returns type "int | bool" rather than "bool" (reportGeneralTypeIssues)
+ .../projects/manticore/tests/native/test_x86.py:63:12 - error: Invalid conditional operand of type "Unknown | BoolNot | bool"
+ Method __bool__ for type "BoolNot" returns type "int | bool" rather than "bool" (reportGeneralTypeIssues)
+ .../projects/manticore/tests/native/test_x86.py:65:12 - error: Invalid conditional operand of type "Unknown | BoolEqual | bool"
+ Method __bool__ for type "BoolEqual" returns type "int | bool" rather than "bool" (reportGeneralTypeIssues)
- 26017 errors, 153 warnings, 0 informations
+ 26024 errors, 153 warnings, 0 informations
jax (https://github.com/google/jax)
+ .../projects/jax/jax/_src/export/shape_poly.py:770:31 - error: Argument of type "Overload[(a: SupportsMul[_T_contra@mul, _T_co@mul], b: _T_contra@mul, /) -> _T_co@mul, (a: _T_contra@mul, b: SupportsRMul[_T_contra@mul, _T_co@mul], /) -> _T_co@mul]" cannot be assigned to parameter "function" of type "(_T@reduce, _S@reduce) -> _T@reduce" in function "reduce"
+ No overloaded function matches type "(_T@reduce, _S@reduce) -> _T@reduce" (reportArgumentType)
+ .../projects/jax/jax/_src/pallas/mosaic_gpu/lowering.py:1090:12 - error: Argument of type "tuple[int, ...]" cannot be assigned to parameter "grid" of type "tuple[int, int, int]" in function "_lower_as_gpu_kernel"
+ "tuple[int, ...]" is not assignable to "tuple[int, int, int]"
+ Tuple size mismatch; expected 3 but received indeterminate (reportArgumentType)
- 3371 errors, 90 warnings, 0 informations
+ 3373 errors, 90 warnings, 0 informations
|
rchiodo
approved these changes
Apr 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upstream typeshed update
b0401bc7dfbaa8eb0c989c0916d7783dfba7a194bd18cc640cba4dadc51ac9a5157b79ff6adf5de3Failure classification
N/A — all tests passed with no changes required.
Pyright fixes
None needed.
Test updates
None.
Precision report
No
reveal_typedeltas. Zero regressions.Validation
Full test suite: 2340 passed, 54 suites, 0 failures.